/*
 * @Author: zengxiaorong zxr1543109808@163.com
 * @Date: 2025-05-09 11:27:33
 * @LastEditors: zengxiaorong zxr1543109808@163.com
 * @LastEditTime: 2025-05-15 11:30:04
 * @FilePath: \carbon-master\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory ,createWebHashHistory} from 'vue-router'

// 导入需要的组件
import electricity from '@/views/electricity/index.vue'

const routes = [
  // 排放因子、电力碳足迹
  {
    path: '/',
    name: 'electricity',
    component: electricity
  }
]

const router = createRouter({
  // history: createWebHistory(), // 解决刷新后路由丢失问题 不带#号
  history: createWebHashHistory(), // 解决刷新后路由丢失问题 带#号
  routes
})

export default router
